package logic

import (
	"context"
	"house/models/mysql"

	"house/houserpc/houserpc"
	"house/houserpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type ConsultDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewConsultDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ConsultDelLogic {
	return &ConsultDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ConsultDelLogic) ConsultDel(in *houserpc.ConsultDelRequest) (*houserpc.ConsultDelResponse, error) {
	// todo: add your logic here and delete this line
	begin := mysql.DB.Debug().Where("id=?", in.ConsultId).Find(&mysql.Consult{})
	begin.Commit()
	return &houserpc.ConsultDelResponse{}, nil
}
